home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
man
/
cat.3
/
GetSelect.3
< prev
next >
Wrap
Text File
|
1995-07-25
|
6KB
|
133 lines
TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333)))) TTTTkkkk (((( )))) TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333))))
_________________________________________________________________
NNNNAAAAMMMMEEEE
Tk_GetSelection - retrieve the contents of the selection
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
int
TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn(_i_n_t_e_r_p, _t_k_w_i_n, _t_a_r_g_e_t, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
Tcl_Interp *_i_n_t_e_r_p (in) Interpreter to use
for reporting errors.
Tk_Window _t_k_w_i_n (in) Window on whose
behalf to retrieve
the selection
(determines display
from which to
retrieve).
Atom _t_a_r_g_e_t (in) Form in which to
retrieve selection.
Tk_GetSelProc *_p_r_o_c (in) Procedure to invoke
to process pieces of
the selection as they
are retrieved.
ClientData _c_l_i_e_n_t_D_a_t_a (in) Arbitrary one-word
value to pass to
_p_r_o_c.
_________________________________________________________________
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn retrieves the selection in the format
specified by _t_a_r_g_e_t. The selection may actually be
retrieved in several pieces; as each piece is retrieved,
_p_r_o_c is called to process the piece. _P_r_o_c should have
arguments and result that match the type TTTTkkkk____GGGGeeeettttSSSSeeeellllPPPPrrrroooocccc:
typedef int Tk_GetSelProc(
ClientData _c_l_i_e_n_t_D_a_t_a,
Tcl_Interp *_i_n_t_e_r_p,
char *_p_o_r_t_i_o_n);
The _c_l_i_e_n_t_D_a_t_a and _i_n_t_e_r_p parameters to _p_r_o_c will be copies
of the corresponding arguments to TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn. _P_o_r_t_i_o_n
will be a pointer to a string containing part or all of the
selection. For large selections, _p_r_o_c will be called
several times with sucessive portions of the selection. The
X Inter-Client Communication Conventions Manual allows the
Page 1 (printed 7/23/95)
TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333)))) TTTTkkkk (((( )))) TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333))))
selection to be returned in formats other than strings, e.g.
as an array of atoms or integers. If this happens, Tk
converts the selection back into a string before calling
_p_r_o_c. If the selection is returned as an array of atoms, Tk
converts it to a string containing the atom names separated
by white space. For any other format besides string, Tk
converts the selection to a string containing hexadecimal
values separated by white space.
TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn returns to its caller when the selection has
been completely retrieved and processed by _p_r_o_c, or when a
fatal error has occurred (e.g. the selection owner didn't
respond promptly). TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn normally returns TCL_OK;
if an error occurs, it returns TCL_ERROR and leaves an error
message in _i_n_t_e_r_p->_r_e_s_u_l_t. _P_r_o_c should also return either
TCL_OK or TCL_ERROR. If _p_r_o_c encounters an error in dealing
with the selection, it should leave an error message in
_i_n_t_e_r_p->_r_e_s_u_l_t and return TCL_ERROR; this will abort the
selection retrieval.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
format, get, selection retrieval
Page 2 (printed 7/23/95)